package hy;

import org.junit.Test;
import redis.clients.jedis.Jedis;

public class Demo3 {
    @Test//主从复制
    public void master_slave(){
        Jedis master=new Jedis("192.168.188.100",6379);
        Jedis slave=new Jedis("192.168.188.100",6380);
        slave.slaveof("192.168.188.100",6379);
        master.set("driver","com.mysql.driver");
        System.out.println(slave.get("driver"));
    }
}
